package com.haisen.dataobject.mapper.base;

import com.haisen.core.utils.MyMapper;
import com.haisen.dataobject.dto.RankDto;
import com.haisen.dataobject.entity.Rank;
import com.haisen.dataobject.query.RankDynaSqlProvider;
import com.haisen.dataobject.query.RankQuery;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

public interface RankMapper extends MyMapper<Rank> {


    /**
     * 积分按月度汇总页面有查询功能，增加动态sql语句查询
     */
    @SelectProvider(type=RankDynaSqlProvider.class,method="selectWithRankSql")
    List<RankDto> findDtoByWhere(RankQuery rankQuery);

    /**
     * 积分按月度汇总，分页total参数
     * @param rankQuery
     * @return
     */
    @SelectProvider(type=RankDynaSqlProvider.class,method="selectCountWithRankSql")
    Integer selectDtoCountByWhere(RankQuery rankQuery);

}